<template>
	<view class="content">
		<swiper class="swiper" indicator-dots="true" circular="true" indicator-active-color="#333">
			<swiper-item>
			  <image @click="url" src="../../static/33.jpg" class="slide-image" mode="scaleToFill"></image>
			</swiper-item>
			<swiper-item>
			  <image @click="url" src="../../static/444.jpg" class="slide-image" mode="scaleToFill"></image>
			</swiper-item>
		</swiper>
	<view class="daoji">{{miao}} S</view>
	</view>
</template>

<script>
	var app=getApp();
	export default {
		data() {
			return {
				miao:5
			}
		},
		onReady() {
			var that=this;
			var s=setInterval(function(){
				if(that.miao==0){
					clearInterval(s);
					uni.switchTab({
					    url: '/pages/index/index'
					});
				}else{
					that.miao--;
				}
			},1000)
		},
		methods: {
			url(){
				var urlStr = encodeURI("https://www.baidu.com/")
				plus.runtime.openURL(urlStr);
			}
		}
	}
</script>

<style>
	.daoji{width:50px;height:30px;line-height: 30px;text-align: center;background-color: #999;border-radius: 15px;position: fixed;top:100px;right: 30px;z-index: 9999;opacity: 0.9;color:#000;}
	.slide-image{width:100%;height:100%;}
	.swiper{width:100%;height:100vh;}
	.content{width:100%;height:100vh;overflow: hidden;background-color: #007AFF;}
</style>
